<template>
  <img :src="result && result.url">
</template>

<script lang="ts">
import axios from 'axios'
import {defineComponent} from 'vue'

export default defineComponent({
  async setup() {
    const rawData = await axios.get('https://picsum.photos/id/786/200/200')
    return {
      result: rawData.config
    }
  }
})
</script>

<style scoped lang="scss">
  img{
    display: block;
    width:200px;
    height:200px;
    box-sizing: border-box;
    background-color:#eee;
    margin:0 auto;
  }
</style>